<?php	

require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();

$app = new \Slim\Slim();

// debug stuff
error_reporting(E_ALL);
$app->config('debug', true);
	
$app->get('/', function () {
	echo "<h1>Deutschlands Stube - Webservice</h1>";
    echo "<a href=\"locations\">Locations</a><br/>";
});

include 'database_info.php';		// database information
include 'database.php';				// common database methods
include 'stube.php';				// methods for this REST webservice

include 'bootstrap_event.php';		// code for URL /event(s)
include 'bootstrap_location.php';	// code for URL /location(s)

connectToDatabase();
$app->run();
?>